<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
		*{margin:0px; padding:0px;font-family:"微软雅黑";}
		#News{width:300px;height:240px; margin:100px auto; border:1px solid #E0E0E0;}
		#News p{height:31px;background:url("images/bg1.gif");}
		#News p span{width:94px;height:31px; display:block; float:left; background:url("images/bg1.gif");
		font-size:14px; line-height:31px; text-align:center; }
		#News p span.active{background:url("images/bg2.gif"); color:#fff;}
		#News .con{width:270px; margin:10px auto 0px; height:209px; overflow:hidden;}
		#News .con ul li{line-height:39px;font-size:12px; border-bottom:1px dotted #ddd; list-style-type:none;position:relative; text-indent:50px;}
		#News .con ul li a{color:#000;text-decoration:none;}
		#News .con ul li a:hover{color:red;}
		#News .con ul li span{width:21px;height:15px; background:url("images/but.gif");  color:#fff;
		font-size:12px; display:block; line-height:15px; text-align:center;
		position:absolute; left:10px; top:12px; text-indent:0px;}
		</style>

	</head>
	<body>
		<div style="float: right;">
			<P><a href="原生制作QQ选项功能.html">原生制作QQ选项功能</a></P>
			<a href="简单图片轮播.html">简单图片轮播</a><br />
			<a href="自定义复选框.html">自定义复选框</a>
		</div>
		<div id="News">
			<p><span class="active">热门排行</span><span>美图速递</span><span>社区Top</span></p>
			<div class="con">
				<ul>
					<li><span>1</span><a href="">产后妈妈分享：成功祛除妊娠纹经历</a></li>
					<li><span>2</span><a href="">营养不足 你初老了吗</a></li>
					<li><span>3</span><a href="">儿童淘气不要急 父母巧应对</a></li>
					<li><span>4</span><a href="">孕妇产力不足 临产小诀窍</a></li>
					<li><span>5</span><a href="">新生儿脸色发黄 注意补充营养</a></li>
				</ul>
		
				<ul>
					<li><span>1</span><a href="">[重磅推荐]大量涉黄场所被清剿</a></li>
					<li><span>2</span><a href=""> [高清大图]胡兵复古大片激情四射</a></li>
					<li><span>3</span><a href="">[活色生香]贝嫂内衣写真玉体横陈 </a></li>
					<li><span>4</span><a href="">[高清大图]倪妮表情鬼马俏皮可爱 </a></li>
					<li><span>5</span><a href="">[重磅推荐]选美文化 在繁华中落寞</a></li>
				</ul>
		
		
				<ul>
					<li><span>1</span><a href="">能遇见你就是我最大的幸福 愿得一</a></li>
					<li><span>2</span><a href="">最伤身体的10个生活习惯，一定要避</a></li>
					<li><span>3</span><a href="">儿童淘气不要急 父母巧应对</a></li>
					<li><span>4</span><a href="">孕妇产力不足 临产小诀窍</a></li>
					<li><span>5</span><a href="">新生儿脸色发黄 注意补充营养</a></li>
				</ul>
			</div>
		</div>
	<script>
		var aSpan = News.getElementsByTagName("p")[0].getElementsByTagName('span');
		var aCon = document.getElementsByClassName('con')[0];
		var aUl = aCon.getElementsByTagName('ul');
		
		for (var i = 0; i < aSpan.length; i++) {
			aSpan[i].index = i
			
			aSpan[i].onmouseover = function(){
				for(var j = 0;j<aSpan.length;j++){
					aSpan[j].className = '';
					aUl[j].style.display = 'none'
				}
				
				aUl[this.index].style.display = 'block'
				this.className = 'active';
				
			}
			aSpan[i].onmouseout = function(){
				this.className = 'active'
			}
		}
	</script>
	</body>
</html>
